// ================================================================================
// 		File: PartyJoinProbationaryResume.cs
// 		Desc: 
//  
// 		Called by:   
//               
// 		Auth: chenwenzhi（--）
// 		Date: 2015-12-28 23:59
// ================================================================================
// 		Change History
// ================================================================================
// 		Date:		Author:				Description:
// 		--------	--------			-------------------
//    
// ================================================================================
// --
// ================================================================================
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;

namespace ZHDJ.Data.Models.JoinParty
{
    /// <summary>
    /// 
    /// </summary>   
    public class PartyJoinProbationaryResume : EntityBase
    {
        #region 属性


        /// <summary>
        /// TimeToTime
        /// </summary>
        [StringLength(512)]
        public string StartTime { get; set; }

        [StringLength(512)]
        public string EndTime { get; set; }

        /// <summary>
        /// Where
        /// </summary>
        [StringLength(512)]
        public string Where { get; set; }

        /// <summary>
        /// Witness
        /// </summary>
        [StringLength(512)]
        public string Witness { get; set; }

        /// <summary>
        /// ActivistsID
        /// </summary>
        [StringLength(128)]
        public string ActivistsID { get; set; }

        public int? OrderNo { get; set; }

        #endregion

        /// <summary>
        /// 获取GetDataGrid数据源
        /// </summary>
        /// <returns></returns>
        public static DataSet GetGridData(string ActivistsID)
        {
            string sql = string.Format("select * from tblPartyJoinProbationaryResume where ActivistsID = '{0}' order by OrderNo asc", ActivistsID);
            return MySqlHelper.ExecuteDataSet(sql);

        }
        /// <summary>
        /// 删除所有相关的简历数据
        /// </summary>
        /// <param name="ActivistsID">积极份子ID</param>
        public static void DeleteResumeData(string ActivistsID)
        {
            string sql = string.Format(@"delete from tblPartyJoinProbationaryResume where ActivistsID = '{0}'", ActivistsID);
            MySqlHelper.ExecuteNonQuery(sql);
        }
    }
}
